package com.mbc.hr.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="hr_attendancepolicydetails")
@NamedQueries({
	@NamedQuery(name="AttendancePolicyDetail.findByPolicyID",query="SELECT apd FROM AttendancePolicyDetail apd WHERE apd.attendancePolicyID = :policyID"),
	@NamedQuery(name="AttendancePolicyDetail.deleteByPolicyID",query="DELETE FROM AttendancePolicyDetail apd WHERE apd.attendancePolicyID = :policyID"),
	@NamedQuery(name="AttendancePolicyDetail.getPolicyDetailByEmployeeIdNDay", query="SELECT apd FROM AttendancePolicyDetail apd, AttendancePolicy ap, Employee e, EmployeeGroup eg WHERE e.employeeGroupID = eg.employeeGroupID AND eg.attendancePolicyID = ap.attendancePolicyID AND ap.attendancePolicyID = apd.attendancePolicyID AND e.employeeID = :employeeID AND apd.day = :day"),
	@NamedQuery(name="AttendancePolicyDetail.getPolicyDetailByEmployeeID",query="SELECT apd FROM AttendancePolicyDetail apd, AttendancePolicy ap, Employee e, EmployeeGroup eg WHERE e.employeeGroupID = eg.employeeGroupID AND eg.attendancePolicyID = ap.attendancePolicyID AND e.employeeID = :employeeID")
})
public class AttendancePolicyDetail implements Serializable {
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long attendancePolicyDetailsID;
	private long attendancePolicyID;
	private int day;
	private int startTime;
	private int workingHour;
	private int breakHour;
	public long getAttendancePolicyDetailsID() {
		return attendancePolicyDetailsID;
	}
	public void setAttendancePolicyDetailsID(long attendancePolicyDetailsID) {
		this.attendancePolicyDetailsID = attendancePolicyDetailsID;
	}
	public int getDay() {
		return day;
	}
	public void setDay(int day) {
		this.day = day;
	}
	public int getStartTime() {
		return startTime;
	}
	public void setStartTime(int startTime) {
		this.startTime = startTime;
	}
	public long getAttendancePolicyID() {
		return attendancePolicyID;
	}
	public void setAttendancePolicyID(long attendancePolicyID) {
		this.attendancePolicyID = attendancePolicyID;
	}
	public int getWorkingHour() {
		return workingHour;
	}
	public void setWorkingHour(int workingHour) {
		this.workingHour = workingHour;
	}
	public int getBreakHour() {
		return breakHour;
	}
	public void setBreakHour(int breakHour) {
		this.breakHour = breakHour;
	}
}
